<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="deviceTypeList" checkbox="true" fitColumns="true" title="设备信息" actionUrl="deviceReturnController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="品牌"  field="brand.brandName"  hidden="true" query='true' queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="型号"  field="model.modelName"    queryMode="single"  width="100" query="true"></t:dgCol> 
   <t:dgCol title="设备编号"  field="deviceNo"  query="true"   queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="RFID号"  field="rfidNo"    queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="名称"  field="name"    queryMode="single"  width="120" query="true"></t:dgCol>
   <t:dgCol title="领用人"  field="usePerson.realName"    queryMode="single"  width="80"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="140"></t:dgCol>
   <t:dgFunOpt funname="returnDevice(id)" title="归还"></t:dgFunOpt>  
  </t:datagrid>
  </div>
 </div>
 <script type="text/javascript">
 $(document).ready(function(){
 	//给时间控件加上样式
 	$("#deviceTypeListtb").find("input[name='createDate']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 	$("#deviceTypeListtb").find("input[name='updateDate']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 });
 
 function returnDevice(id){
	  var addurl = 'deviceReturnController.do?goReturn&id='+id;
	  $.dialog({
		  	id:'deviceReturn',
			content: 'url:'+addurl,
			lock : true,
			zIndex: 50, 
			width:350,
			height:170,
			title:'设备归还', 
			opacity : 0.3,
			cache:false,
			close:reloadTable
		});
 }
  
 </script>